home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 0195.ZIP / GRFXTABL.PAS < prev    next >
Pascal/Delphi Source File  |  1984-12-04  |  2KB  |  58 lines

  1. {@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
  2. The purchaser of these procedures and functions may include them in COMPILED
  3. programs freely, but may not sell or give away the source text.
  4.  
  5.      The file GRFXTABL.LIB contains the definition of a variable
  6.      called "table" that is exactly the "shape" of the ROM graphics
  7.      table, and in the same place.  Because it's ROM, we can't
  8.      change it, but we can look at how the characters are mapped
  9.      out.  These are exactly the dot patterns used in text mode.
  10.  
  11. }
  12.  
  13. {$I windows.lib}
  14. {$I grfxtabl.lib}
  15. {$I getkeys.lib}
  16. const
  17.   CharWin : corners = (60,5,67,13);
  18.   TextWin : corners = (2,2,50,23);
  19.   MainWin : corners = (1,1,80,25);
  20.  
  21. var
  22.   C, D : char;
  23.  
  24. {@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}
  25. begin
  26.   DoFrame(TextWin,'═','║');
  27.   DoWindow(TextWin);
  28.   WriteLn('Press any key that generates a character with');
  29.   WriteLn('an ASCII code < 127.  This program looks up the');
  30.   WriteLn('"picture" of that character in the Video ROM');
  31.   WriteLn('and shows it onscreen. The characters produced');
  32.   WriteLn('by holding down the <Alt> key and typing in a');
  33.   WriteLn('number from 1 to 31 on the keypad are enter-');
  34.   WriteLn('taining.');
  35.   WriteLn;
  36.   WriteLn('Keys that generate "Escape codes" (function');
  37.   WriteLn('keys, arrow keys) will display the character');
  38.   WriteLn('AFTER the Esc.');
  39.   WriteLn;
  40.   WriteLn('Press <SpaceBar> to begin, <Esc> to end.');
  41.   repeat until keypressed;
  42.   DoFrame(CharWin,'─','│');
  43.   DoWindow(CharWin);
  44.   repeat
  45.     GetKeys(C,D);
  46.     if C = #27 then
  47.       ShowEntry(table[ord(D)])
  48.     else
  49.       ShowEntry(table[ord(C)]);
  50.   until (C = #27) and (D = #0);
  51.   DoWindow(MainWin);
  52.   ClrScr;
  53. end.
  54.  
  55.  
  56.  
  57.  
  58.